package com.github.shiqiyue.app.modules.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.shiqiyue.app.modules.sys.entity.FileUpload;
import com.github.shiqiyue.app.modules.sys.mapper.FileUploadMapper;
import com.github.shiqiyue.app.modules.sys.service.IFileUploadService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 文件上传 服务实现类
 * </p>
 *
 * @author wenyao.wu
 * @since 2020-06-14
 */
@Service
public class FileUploadServiceImpl extends ServiceImpl<FileUploadMapper, FileUpload> implements IFileUploadService {

    @Override
    public void addRecord(Long userId, String fileUrl, String filePath, String ossObjectname) {
        FileUpload fileUpload = new FileUpload();
        fileUpload.setLocalFilePath(filePath);
        fileUpload.setFileUrl(fileUrl);
        fileUpload.setOssObjectName(ossObjectname);
        fileUpload.setAddUserId(userId);
        this.save(fileUpload);
    }


}
